/***************************************************************************
 *   Copyright (C) 2008 by BogDan Vatra                                    *
 *   bogdan@licentia.eu                                                    *
 *                                                                         *
 *   This program is free software: you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation, either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 ***************************************************************************/
#include <QtCore>

#include "parametriiKontAMabilPlugin.h"
#include "parametriiKontAMabil.h"

inline void initMyResource()
{
	Q_INIT_RESOURCE(parametriiKontAMabil);
}

ParametriiKontAMabilPlugin::ParametriiKontAMabilPlugin(QObject *parent):QObject(parent)
{
	initMyResource();

}

KontAMabilWindow * ParametriiKontAMabilPlugin::createWidget(QWidget * parent)
{
	KontAMabilWindow * m_widget = new ParametriiKontAMabil(parent);
	m_widget->setObjectName(name());
	return m_widget;
}

QIcon ParametriiKontAMabilPlugin::icon(const QString &)
{
    return QIcon(":/parametriiKontAMabil/parametriiKontAMabil.png");
}

int ParametriiKontAMabilPlugin::order()
{
	return 0;
}

QString ParametriiKontAMabilPlugin::querys()
{
	return QString();
	QFile f(":/parametriiKontAMabil/sql.xml");
	if (!f.open(QIODevice::ReadOnly))
		return QString();
	QString querys=f.readAll();
	f.close();
	return querys;
}

int ParametriiKontAMabilPlugin::menuGroup(const QString &)
{
	return 90;
}

QString ParametriiKontAMabilPlugin::toolTip(const QString &)
{
	return "Parametrii aplicatie";
}

QString ParametriiKontAMabilPlugin::name()
{
	return "parametriiKontAMabil";
}

QString ParametriiKontAMabilPlugin::version()
{
	return "0.1";
}

QString ParametriiKontAMabilPlugin::depends()
{
	return "meniu";
}

QString ParametriiKontAMabilPlugin::recommends()
{
	return QString();
}

QString ParametriiKontAMabilPlugin::description(const QString &)
{
	QFile f(":/parametriiKontAMabil/doc.html");
	if (!f.open(QIODevice::ReadOnly))
		return QString();
	QString doc=f.readAll();
	f.close();
	return doc;
}

QStringList ParametriiKontAMabilPlugin::menus()
{
	return QStringList()<<"/Operatii speciale/Parametrii aplicatie";
}

QStringList ParametriiKontAMabilPlugin::showMenus()
{
	return QStringList()<<"Operatii speciale";
}

Q_EXPORT_PLUGIN2(parametriiKontAMabilPlugin, ParametriiKontAMabilPlugin);
